package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingProject;
import com.zzyl.vo.NursingProjectVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface NursingProjectMapper {

    /**
     * 根据名称和状态查询
     *
     * @param name
     * @param status
     * @return
     */
    Page<NursingProjectVo> selectPageByNameAndStatus(String name, Integer status);

    /**
     * 插入
     *
     * @param nursingProject
     * @return
     */
    Integer insert(NursingProject nursingProject);

    /**
     * 根据id删除
     *
     * @param id
     * @return
     */
    Integer deleteById(long id);

    /**
     * 更新
     *
     * @param nursingProject
     * @return
     */
    Integer update(NursingProject nursingProject);

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    NursingProject selectById(long id);


    /**
     * 根据护理项目名称查询数量
     *
     * @param name
     * @return
     */
    Integer countByNursingProjectName(String name);

    /**
     * 查询所有护理项目
     *
     * @return
     */
    List<NursingProject> selectAll();
}
